package com.bsoft.gol.hcs.enumcase;

/**
 * @Author: lanyu
 * @Description:因素时间类型枚举
 * @Date: create in 2022/6/9 18:40
 */
public enum FactorTimeTypeEnum {
    FULL((byte) 1, "满"),
    WITHIN((byte) 2, "内");

    private final Byte type;

    private final String name;

    FactorTimeTypeEnum(Byte type, String name) {
        this.type = type;
        this.name = name;
    }

    public static FactorTimeTypeEnum getEnumByKey(Byte type) {
        for (FactorTimeTypeEnum temp : FactorTimeTypeEnum.values()) {
            if (temp.getType().equals(type)) {
                return temp;
            }
        }
        return null;
    }

    public Byte getType() {
        return type;
    }

    public String getName() {
        return name;
    }
}
